package com.example.springbootdemo3.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
public class TestController {
    //1.获取日志对象
    /*private static Logger logger = LoggerFactory.getLogger(TestController.class);*/
    @RequestMapping("/test")
    public void sayhi() {
        log.info("我是info");
        log.error("我是error");
        log.warn("我是warn");
    }
}
